package com.hyt.it.ogt.ykcj.common.enums;

/**
 * 导出类型枚举
 *
 * @author admin
 */
public enum ExportType
{
    // 通用
    EXPORT_TYPE_EXAM_RATE("examRate","导出实考虑趋势"),
    EXPORT_TYPE_PASS_RATE("passRate","导出合格率趋势"),
    EXPORT_TYPE_SUBJECT("subject","按科目导出"),
    ANSLYSIS_TYPE_AREA("area","按区域导出"),
    UNKNOWN("unkonw","未知"),

    ;
    // 分析类型
    private  String code;

    // 文件描述
    private String desc;



    ExportType(String code, String desc)
    {
        this.code = code;
        this.desc = desc;
    }

    public static ExportType getAnalysisByCode(String code) {
        for (ExportType analysisType : ExportType.values()) {
            if (analysisType.getCode().equals(code)) {
                return analysisType;
            }
        }
        return ExportType.UNKNOWN;
    }

    public String getCode() {
        return code;
    }


    public String getDesc() {
        return desc;
    }}
